]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Grab the key focus when hovering over a window
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 4 Nov 2013 22:25:18 +0000 (17:25 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 4 Dec 2013 16:22:55 +0000 (11:22 -0500)
This is simply an experiment. I'm not sure I like the result, but it was
worth trying out regardless.

https://bugzilla.gnome.org/show_bug.cgi?id=644306

js/ui/workspace.js

index d1abc225ea463c8855c1b16b504daa639016667b..34090de3e79b023fa5cbdb4310e59dec7f5a20e4 100644 (file)
@@ -89,6 +89,7 @@ const WindowClone = new Lang.Class({
         this.actor.add_action(clickAction);
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
         this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
+        this.actor.connect('enter-event', Lang.bind(this, this._onEnter));
 
         this._draggable = DND.makeDraggable(this.actor,
                                             { restoreOnSuccess: true,
@@ -213,6 +214,10 @@ const WindowClone = new Lang.Class({
         return false;
     },
 
+    _onEnter: function() {
+        this.actor.grab_key_focus();
+    },
+
     _onClicked: function(action, actor) {
         this._activate();
     },